Reduce iterations and allocations for Namespace#routes#2440
Merged
pablobm merged 2 commits intothoughtbot:mainfrom Jan 24, 2025
Merged
Reduce iterations and allocations for Namespace#routes#2440pablobm merged 2 commits intothoughtbot:mainfrom
pablobm merged 2 commits intothoughtbot:mainfrom
Conversation
3699558 to
5f18abe
Compare
5f18abe to
b8fec65
Compare
Member
|
I rebased this as the tests didn't seem to have run. I'd like to test this out on a few applications first just to check there's no odd regressions in the situations I have access to, but it might take me a while. |
Collaborator
|
@nickcharlton - Were you able to test this? By the way, the CI failed, but it was some time ago so I can't see the logs. Would someone be able to rebase, please? |
This method is called during all requests and this change reduces the amount of work needed to be done.
b8fec65 to
31b60e6
Compare
Member
|
I've just rebased. I'll let CI run and check back in. |
Collaborator
|
I have been testing this a bit and I think it's a good change. Merging. Thank you @enviable! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! I noticed that the Namespace#routes method was called during most/(all?) requests and could be optimized to reduce iterations and memory allocations.